package io.renren.modules.school.controller;

import io.renren.common.utils.R;
import io.renren.modules.school.service.SelectProfessionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("school/selectSchool")
public class SelectProfessionController {

    @Autowired
    private SelectProfessionService selectProfessionService;

    @RequestMapping("/ByProfessionType")
    public R selectSchoolByProfessionType(@RequestBody Map<String, Object> params){
        List l=selectProfessionService.selectNameByProfesisonType(params);
        return R.ok().put("schoolByProfession",l);
    }

    @RequestMapping("/ByProfessionName")
    public R selectSchoolByProfessionName(@RequestBody Map<String, Object> params){
        List l=selectProfessionService.selectSchoolByProfessionName(params);
        return R.ok().put("universitys",l);
    }
}
